﻿@{
    
var db = Database.Open("EPS");
  var did = Request.QueryString[0];

  if (did.IsEmpty()) {
      Response.Redirect("~/EPSHomePage.cshtml");
  }
  

   
  var id = did;
  if(id!=null){
      if(id.Length>0){
  Session["did"]=id;
  Write(did);
  }
  }
  if( IsPost && !did.IsEmpty()) {
    var deleteQueryString = "DELETE FROM awaitinguser WHERE deviceid='"+Session["did"]+"'";
    


    db.Execute(deleteQueryString, did);
    Response.Redirect("~/AwaitingUsers.cshtml");
  }
    
}

<!DOCTYPE html>

<html lang="en">
    <head>
    <title>Decline User</title>
</head>
<body>
    
      
    <div>
  <h1></br>Decline User - Confirmation</h1>
  <form method="post" action="" name="form">
    <p>Are you sure you want to decline the following user?</p>
     
    <p>
       
    
    </p>

    <p><input type="submit" value="Decline" /></p>

    <a href="~/AwaitingUsers.cshtml" style="color: #0094ff">Go Back</a>
      
  </form>
    </div>
      
</body>
</html>
